home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Texteditors / Origami / bindings / fun / mt-fold < prev    next >
Encoding:
Text File  |  1996-09-27  |  868 b   |  37 lines

  1. ;OCL{{{}}}
  2. ;OCL{{{  comments
  3. ; simulate the tds-operations TOP and BOTTOM, which jump to top and bottom
  4. ; of currently OPENED fold.
  5. ;OCL}}}
  6. @if-using not(ocl-file-mt-fold)
  7.   @use (ocl-file-mt-fold)
  8.   ;OCL{{{  top
  9.   ( deffun mtool-top
  10.      ( if in-prompt ( return-from-macro ) fi
  11.        screen-off
  12.        if test-end-fold ( previous-line ) fi
  13.        while and(not(test-begin-fold),not(test-top))
  14.         ( if test-end-fold ( mtool-top ) fi
  15.            previous-line
  16.         )
  17.        screen-on
  18.        redraw-display
  19.      )
  20.   )
  21.   ;OCL}}}
  22.   ;OCL{{{  bot
  23.   ( deffun mtool-bot
  24.      ( if in-prompt ( return-from-macro ) fi
  25.        screen-off
  26.        if test-begin-fold (next-line) fi
  27.        while and(not(test-end-fold),not(test-bottom))
  28.         ( if test-begin-fold ( mtool-bot ) fi
  29.           next-line
  30.         )
  31.        screen-on
  32.        redraw-display
  33.      )
  34.   )
  35.   ;OCL}}}
  36. @fi
  37.